﻿@model SDSystem.Models.Organisation
@using Ext.Net.MVC;
@using Ext.Net;
@{
    ViewBag.Title = "EditOrgRole";
    Layout = "~/Views/Shared/_Layout.cshtml";
}




@(Html.X().FormPanel().ID("EditOrgRoleForm")
      .Layout(LayoutType.Form)
      .MarginSpec("0 0 0 0")
      .BodyPadding(10)
      .Items(
          Html.X().HiddenFor(m => m.OrgId).ID("EditOrgRoleFormId"),
          Html.X().TextFieldFor(m=>m.OrgName).FieldLabel("Organisation Name").Margins("0 10 10 5").LabelWidth(200).ReadOnly(true),
          Html.X().TextAreaFor(m=>m.OrgShortDescription).FieldLabel("Organisation Short Description").Margins("0 10 10 5").LabelWidth(200).ReadOnly(true),
          Html.X().MultiCombo().ID("listRoleOrg").FieldLabel("Roles Name").Margins("0 10 10 5").LabelWidth(200).SelectedItems(ViewBag.SelectedRole)
              .Items(ViewBag.ListRole
                 
                  //Html.X().ListItem().Text("Finder"),                                                                                   
                  //Html.X().ListItem().Text("Lead"),
                  //Html.X().ListItem().Text("Delivery"),
                  //Html.X().ListItem().Text("Auditor")
                 
              )
      )
      .BottomBar(Html.X().Toolbar().Items(
          Html.X().ToolbarFill(),
          Html.X().ToolbarSeparator(),
          Html.X().ToolbarSpacer(),
          Html.X().Button().Text("Ok").Icon(Icon.Accept).DirectEvents(de=>
                                                                          {
                                                                              de.Click.Url =Url.Action("SaveOrgRole");
                                                                              de.Click.EventMask.ShowMask = true;
                                                                              de.Click.FormID = "EditOrgRoleForm";

                                                                          }).Listeners(ls => ls.Click.Handler = "window.parent.location.reload();parentAutoLoadControl.close();"),
          Html.X().Button().Text("Cancel").Icon(Icon.Cancel).Listeners(ls=>ls.Click.Handler="parentAutoLoadControl.close();")
                     )))